package com.lufei4.chestnut.orbyun.Broad;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.blankj.utilcode.util.ToastUtils;

/**
 * @ProjectName: Chestnut
 * @Package: com.lufei4.chestnut.orbyun.Broad
 * @ClassName: MyBroadcastReceiver
 * @Description: java类作用描述
 * @Author: liushijiang 15833013864@163.com
 * @CreateDate: 2020/9/25 17:21
 * @UpdateUser: 更新者：
 * @UpdateDate: 2020/9/25 17:21
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */

public class MyBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Bundle data = intent.getBundleExtra("data");
        assert data != null;
        String name = data.getString("name", "000");
        ToastUtils.showShort(name);
        ObservableObject.getInstance().updateValue("我是广播");
    }
}
